home *** CD-ROM | disk | FTP | other *** search
-
-
-
- XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX))))
-
-
-
- NNNNAAAAMMMMEEEE
- _X_m_G_e_t_P_i_x_m_a_p - A pixmap caching function that generates a
- pixmap, stores it in a pixmap cache, and returns the pixmap
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <Xm/Xm.h>
-
- Pixmap XmGetPixmap (ssssccccrrrreeeeeeeennnn,,,, iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee,,,, ffffoooorrrreeeeggggrrrroooouuuunnnndddd,,,, bbbbaaaacccckkkkggggrrrroooouuuunnnndddd)
- _S_c_r_e_e_n *ssssccccrrrreeeeeeeennnn;
- _c_h_a_r *iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee;
- _P_i_x_e_l ffffoooorrrreeeeggggrrrroooouuuunnnndddd;
- _P_i_x_e_l bbbbaaaacccckkkkggggrrrroooouuuunnnndddd;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _X_m_G_e_t_P_i_x_m_a_p uses the parameter data to perform a lookup in
- the pixmap cache to see if a pixmap has already been
- generated that matches the data. If one is found, a
- reference count is incremented and the pixmap is returned.
- Applications should use _X_m_D_e_s_t_r_o_y_P_i_x_m_a_p when the pixmap is
- no longer needed.
-
- If a pixmap is not found, iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee is used to perform a
- lookup in the image cache. If an image is found, it is used
- to generate the pixmap, which is then cached and returned.
-
- If an image is not found, iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee is used as a filename,
- and a search is made for either an xpm pixmap file or an _X_1_0
- or _X_1_1 bitmap file. If it is found, the file is read,
- converted into an image, and cached in the image cache. The
- image is then used to generate a pixmap, which is cached and
- returned.
-
- If iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee has a leading slash (/), it specifies a full
- pathname, and _X_m_G_e_t_P_i_x_m_a_p opens the file as specified.
- Otherwise, iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee specifies a filename. In this case,
- _X_m_G_e_t_P_i_x_m_a_p looks for the file along the following search
- paths, specified by _X_M_I_C_O_N_S_E_A_R_C_H_P_A_T_H or _X_M_I_C_O_N_B_M_S_E_A_R_C_H_P_A_T_H
- depending on the type of display, _X_B_M_L_A_N_G_P_A_T_H and a default
- search path, which varies depending on whether or not the
- _X_A_P_P_L_R_E_S_D_I_R environment variable is set. The order of the
- search, is _X_M_I_C_O_N_S_E_A_R_C_H_P_A_T_H or _X_M_I_C_O_N_B_M_S_E_A_R_C_H_P_A_T_H first,
- _X_B_M_L_A_N_G_P_A_T_H second, _X_A_P_P_L_R_E_S_D_I_R third, and finally the
- vendor default search path (see below), until either the
- file is found or the paths are all visited.
-
- Both the environment variables _X_M_I_C_O_N_S_E_A_R_C_H_P_A_T_H and
- _X_M_I_C_O_N_B_M_S_E_A_R_C_H_P_A_T_H specify a search path for xpm pixmap and
- X bitmap files. _X_m_G_e_t_P_i_x_m_a_p uses _X_M_I_C_O_N_S_E_A_R_C_H_P_A_T_H on a
- color display and _X_M_I_C_O_N_B_M_S_E_A_R_C_H_P_A_T_H on a monolithic one.
- The type of the display is determined automatically through
- the use of Xm/ColorObj. So _X_M_I_C_O_N_S_E_A_R_C_H_P_A_T_H should consist
- of a path where locations of xpm files precede those of
-
-
-
- Page 1 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX))))
-
-
-
- bitmap files, and _X_M_I_C_O_N_B_M_S_E_A_R_C_H_P_A_T_H should maintain a
- search path in favor of bitmap files. These two search paths
- are new in CDE Motif and will be in Motif 2.0. The
- _X_B_M_L_A_N_G_P_A_T_H environment variable, which is here for backward
- compatibility with Motif 1.x, specifies a search path only
- for X bitmap files. All these variables can contain the
- substitution field %B, where the iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee argument to
- _X_m_G_e_t_P_i_x_m_a_p is substituted for %B. They can also contain
- the substitution fields accepted by _X_t_R_e_s_o_l_v_e_P_a_t_h_n_a_m_e. The
- substitution field %T is always mapped to _b_i_t_m_a_p_s, and %S is
- always mapped to NULL.
-
- If neither _X_M_I_C_O_N_S_E_A_R_C_H_P_A_T_H (_X_M_I_C_O_N_B_M_S_E_A_R_C_H_P_A_T_H if
- monolithic) nor _X_B_M_L_A_N_G_P_A_T_H is set but the environment
- variable _X_A_P_P_L_R_E_S_D_I_R is set, the following pathnames are
- searched:
- %B
- $XAPPLRESDIR/%L/bitmaps/%N/%B
- $XAPPLRESDIR/%l/bitmaps/%N/%B
- $XAPPLRESDIR/bitmaps/%N/%B
- $XAPPLRESDIR/%L/bitmaps/%B
- $XAPPLRESDIR/%l/bitmaps/%B
- $XAPPLRESDIR/bitmaps/%B
- $HOME/bitmaps/%B
- $HOME/%B
- /usr/lib/X11/%L/bitmaps/%N/%B
- /usr/lib/X11/%l/bitmaps/%N/%B
- /usr/lib/X11/bitmaps/%N/%B
- /usr/lib/X11/%L/bitmaps/%B
- /usr/lib/X11/%l/bitmaps/%B
- /usr/lib/X11/bitmaps/%B
- /usr/include/X11/bitmaps/%B
-
- If none of the above paths is set, the following pathnames
- are searched:
- %B
- $HOME/%L/bitmaps/%N/%B
- $HOME/%l/bitmaps/%N/%B
- $HOME/bitmaps/%N/%B
- $HOME/%L/bitmaps/%B
- $HOME/%l/bitmaps/%B
- $HOME/bitmaps/%B
- $HOME/%B
- /usr/lib/X11/%L/bitmaps/%N/%B
- /usr/lib/X11/%l/bitmaps/%N/%B
- /usr/lib/X11/bitmaps/%N/%B
- /usr/lib/X11/%L/bitmaps/%B
- /usr/lib/X11/%l/bitmaps/%B
- /usr/lib/X11/bitmaps/%B
- /usr/include/X11/bitmaps/%B
-
- These paths are defaults that vendors may change. For
-
-
-
- Page 2 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX))))
-
-
-
- example, a vendor may use different directories for
- /_u_s_r/_l_i_b/_X_1_1 and /_u_s_r/_i_n_c_l_u_d_e/_X_1_1.
-
- The following substitutions are used in these paths:
-
- %_B The image name, from the iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee argument.
-
- %_N The class name of the application.
-
- %_L The display's language string.
-
- %_l The language component of the display's language
- string.
-
- Parameter descriptions are listed below:
-
- ssssccccrrrreeeeeeeennnn
- Specifies the display screen on which the pixmap is to
- be drawn. The depth of the pixmap is the default depth
- for this screen.
-
- iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee
- Specifies the name of the image to be used to generate
- the pixmap
-
- ffffoooorrrreeeeggggrrrroooouuuunnnndddd
- Combines the image with the ffffoooorrrreeeeggggrrrroooouuuunnnndddd color to create
- the pixmap if the image referenced is a bit-per-pixel
- image
-
- bbbbaaaacccckkkkggggrrrroooouuuunnnndddd
- Combines the image with the bbbbaaaacccckkkkggggrrrroooouuuunnnndddd color to create
- the pixmap if the image referenced is a bit-per-pixel
- image
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- Returns a pixmap when successful; returns
- _X_m_U_N_S_P_E_C_I_F_I_E_D__P_I_X_M_A_P if the image corresponding to the
- iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee cannot be found.
-
- RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
- _X_m_D_e_s_t_r_o_y_P_i_x_m_a_p(_3_X), _X_m_G_e_t_P_i_x_m_a_p_B_y_D_e_p_t_h(_3_X),
- _X_m_I_n_s_t_a_l_l_I_m_a_g_e(_3_X), and _X_m_U_n_i_n_s_t_a_l_l_I_m_a_g_e(_3_X).
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 11/11/03)
-
-
-
-